-
Notifications
You must be signed in to change notification settings - Fork 531
change name to "vfg" instead of "vue-form-generator" for the exported files #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change name to "vfg" instead of "vue-form-generator" for the exported files #126
Conversation
… files. Temporary fix for the ENV variable being undefined
package.json
Outdated
| "prebuild": "npm run test", | ||
| "build:core": "webpack --progress --config webpack.build.config.js --define process.env.FULL_BUNDLE=false --output-filename=vue-form-generator-core.js", | ||
| "build:full": "webpack --progress --config webpack.build.config.js --define process.env.FULL_BUNDLE=true", | ||
| "build:core": "webpack --progress --config webpack.build.config.js --define process.env.FULL_BUNDLE=false --output-filename=vfg-core.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change both build script to cross-env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me explain a bit why i used cross-env. That way We have an explanation for later if I forget why i did that.
Here --define process.env.FULL_BUNDLE=false is the same as using webpack.DefinePlugin in the config.
By doing so, it make process.env.FULL_BUNDLE available in the code. What I didn't notice at first, is the it not yet defined in the config file.
So by using process.env.FULL_BUNDLE there, I get undefined. But by using cross-env, it is available in the config (but not in the code).
So I have to use both cross-env FULL_BUNDLE=true and --define process.env.FULL_BUNDLE=true to make it work.
This is a ugly temporary solution that will be fixed when the lib goes to webpack 2 one day.
Anyway, I added cross-env on both commands like you asked me in the next commit.
webpack.build.config.js
Outdated
| if (!process.env.FULL_BUNDLE) { | ||
| var cssFileName = "vue-form-generator-core.css"; | ||
| var cssFileName; | ||
| console.warn(process.env.FULL_BUNDLE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove console message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, removed
icebob
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Mergeable.
|
Thanks |
change name to "vfg" instead of "vue-form-generator" for the exported files.
Temporary fix for the ENV variable being undefined